﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Styx;
using Styx.Helpers;
using Styx.Logic.BehaviorTree;
using Styx.Plugins.PluginClass;
using Styx.Logic;
using Styx.WoWInternals;
using Styx.WoWInternals.WoWObjects;


namespace ProfileHelper
{
    public class ProfileHelper : HBPlugin
    {
        public override string Name { get { return "Profile Helper"; } }
        public override string Author { get { return "SwInY"; } }
        public override Version Version { get { return new Version(1, 0); } }
        public override void OnButtonPress() { fLog._Instance.Show(); }
        public override bool WantButton { get { return true; } }
        public override string ButtonText { get { return "Log"; } }

        public string FileName;

        public override void  Initialize()
        {
            FileName = DateTime.Now.ToShortTimeString();

            fLog._Instance = new fLog();

            Lua.Events.AttachEvent("QUEST_ACCEPTED", QuestAccept.Accept);
            Lua.Events.AttachEvent("QUEST_FINISHED", QuestFinished.Finished);
        }

        public override void  Dispose()
        {
            Lua.Events.DetachEvent("QUEST_ACCEPTED", QuestAccept.Accept);
            Lua.Events.DetachEvent("QUEST_FINISHED", QuestFinished.Finished);
        }

        public override void Pulse()
        {
        }
    }
}
